home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
snpd9707.zip
/
QUERY.C
< prev
next >
Wrap
Text File
|
1997-07-05
|
847b
|
33 lines
.I 0 1
/* +++Date last modified: 05-Jul-1997 */
.D 1 1
.I 5 8
** Usage: QUERY [Prompt_string] [X] [n]
** where: X = Default answer, `Y' or `N'
** n = Seconds to wait before using default answer
**
** Note: If any option is used, those preceding it must be specified.
** For example, to use the time out feature, both the prompt
** string and default answer must have previously been specified.
**
.I 22 6
fputs(argv[1], stderr);
fputc(' ', stderr);
}
if (2 < argc)
{
def_ch = toupper(*argv[2]);
.D 23 1
.I 24 1
prompt[1] = def_ch;
.D 25 1
.I 26 1
prompt[3] = def_ch;
.D 27 1
.I 30 1
if (3 < argc)
.D 31 1
.I 33 1
limit = (clock_t)(CLK_TCK * atoi(argv[3]));
.D 34 1